package is.common.interfaces.mvc;

import is.common.exception.DroppingNonEmptyDepartmentException;
import is.common.exception.RowNotFoundException;
import is.common.exception.RowsAreaIncorrectException;
import is.common.exception.UniqueCheckFailedException;

import java.io.IOException;

/**
 * @author aspr0
 *         Date: 04.05.12
 *         Time: 5:04
 */
public interface Model
{
    public boolean isActivated();

    public String[] getHeader(Integer sectionNum) throws IOException, ClassNotFoundException;

    public String[][] getRows(Integer sectionNum, Integer rowNumStart, Integer howMany)
            throws RowsAreaIncorrectException, IOException, ClassNotFoundException, RowNotFoundException;

    public void addRow(Integer sectionNum, String[] row)
            throws IOException, ClassNotFoundException, RowNotFoundException, UniqueCheckFailedException;

    public void editRow(Integer sectionNum, String[] row)
            throws UniqueCheckFailedException, RowNotFoundException, IOException, ClassNotFoundException;

    public String dropRows(Integer sectionNum, String[] rowNums)
            throws IOException, ClassNotFoundException, DroppingNonEmptyDepartmentException;

    public String[][] findRows(Integer sectionNum, String[] masks)
            throws IOException, ClassNotFoundException, RowNotFoundException;
}
